/**
 * 
 */
package com.zte.claa.inficombo.csa.app.service.modbus.entity;

import java.io.Serializable;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author 0283000170
 * 
 *  modbus.modbus4j.master.timeout=1000
 *	modbus.modbus4j.master.retries=3
 *
 */

@Component  
@ConfigurationProperties(prefix="modbus.modbus4j.master") 
public class ModbusMasterCommProps implements Serializable {	
	
    //master设置超时时间
	private Integer timeout = 100;
	//master设置重连次数
	private Integer retries = 3;
	//检测连接是否存活
	private Boolean keepAlive = true;
	/* encapsulated确定了协议帧是否是通过tcp封装的RTU结构,
	 * 采用modbus tcp/ip时，设为false, 采用modbus rtu over tcp/ip时，要设为true
	 */	
	private Boolean encapsulated = false;
		
    private static final long serialVersionUID = 1L;
    
	public Integer getTimeout() {
		return timeout;
	}
	public void setTimeout(Integer timeout) {
		this.timeout = timeout;
	}
	public Integer getRetries() {
		return retries;
	}
	public void setRetries(Integer retries) {
		this.retries = retries;
	}
	public Boolean getKeepAlive() {
		return keepAlive;
	}
	public void setKeepAlive(Boolean keepAlive) {
		this.keepAlive = keepAlive;
	}
	public Boolean getEncapsulated() {
		return encapsulated;
	}
	public void setEncapsulated(Boolean encapsulated) {
		this.encapsulated = encapsulated;
	}
	
}
